home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
StartupTools
/
PKludge010.lzh
/
PKludge
/
PKludge.doc
< prev
next >
Wrap
Text File
|
1992-11-03
|
11KB
|
265 lines
NAME
PKludge ("Promotion Kludge", an AmigaDos 3.0 commodity)
AUTHOR, VERSION & COPYRIGHT
Steve Koren
Version 1.0, November 1992
Requires AmigaDos 3.0 or later
PKludge is copyrighted freeware. It may be distributed on PD disk
collections costing no more per disk than the price of a current Fish
disk. PKludge may be uploaded to BBS systems. It may not be sold for
a profit or modified without permission of the author. However, you
are free to give it away to friends, etc.
SYNOPSIS
PKludge [ CX_PRIORITY=n ] [ PROMOTE=string ]
Promotion string is in the following format:
<title>/<o_mode>=<n_mode>/<left>/<top>/<width>/<height>/<oscan>
Where:
<title> = Screen title, or "-" for "don't care".
<o_mode> = Old screen mode, from display database, or "-"
<left> = New screen left edge, or "-" for unchanged
<top> = New screen top edge, or "-" for unchanged
<width> = New screen width, or "-" for unchanged
<height> = New screen height, or "-" for unchanged
<oscan> = TEXT, STANDARD, MAX, VIDEO, or "-" for unchanged
FUNCTION
Screen promotion hack for AmigaDos 3.0 or later. Promotes any graphics
mode or named screen to any other, optionally setting size and
position. Please read the rest of this documentation for details.
DESCRIPTION
AmigaDos 3.0 on the Amiga 4000 supports many graphics modes which are
selected from a display database. This gives the system significant
flexibility for defining new display modes. However, there are a few
problems with this scheme given the current state of some software:
P1. Some old software is not smart enough to use the display
database, but can still cope with any sized screen. A good
example of this is Excellence! 2.0.
P2. If OS 3.0 mode promotion is used, screens are always promoted to
like resolutions. Sometimes this is not desirable.
P3. Multisync monitors must re-sync when displaying screens of
different scan rates. Sometimes it is desirable to display, for
example, 640x400 NTSC:High Res Laced screens on a
Super72:Super-High Res Laced screen in the same 640x400
resolution in order to prevent monitor re-sync during screen
shuffles.
P4. Sometimes promoted screens need to be shifted horizontally in
order to be centered.
PKludge was designed to provide a solution to the above problems by:
S1. Allowing the promotion of any mode to any other mode.
S2. Allowing a change of resolution during mode promotion.
S3. Allowing per-application as well as per-mode promotion.
S4. Allowing screens to be re-positioned during mode promotion.
S5. Allowing the use of the same scan rate for all screens so that
partially obscured depth arranged screens don't look odd.
Why is PKludge a kludge? Because:
* It was written in haste in order to have a solution to these
problems. Its free, and you get what you pay for.
* It is a bit unfriendly. Mode promotion strings are cryptic and
only basic error checking is performed. Little error checking is
done, and you can screw things up if you try.
* Some applications may not like screens of other resolutions.
PKludge makes no attempt to do anything about this other than to
allow application specific mode promotion.
* The need for PKludge should go away once all applications support
the display database. Therefore, I'm not worried about making
this into something more real.
PKludge is a commodity and can be disabled or killed with the Commodity
Exchange. It does not have a fancy graphical user interface. Instead,
it is controlled via cryptic workbench icon tooltypes or command line
arguments. It should be installed in the WBStartup directory. The
supported tooltypes are:
CX_PRIORITY=<n>
PROMOTE=<title>/<o_mode>=<n_mode>/<left>/<top>/<width>/<height>/<oscan>
The PROMOTE tooltype is the only interesting one. It sounds more
complex than it is - the example section below should make it clear.
PKludge works as follows: It intercepts open screen calls and checks
them against its list of screen names and modes. If it finds a match,
it substitutes the new values (to the right of the 2nd "=" sign), and
then opens the screen. If it finds no match, the screen is opened as
expected.
WARNING: If you don't know what you are doing, you can cause
applications to crash. It is best to understand what you are promoting
to what in order to avoid confusing applications. Some good rules to
follow are given later on.
A "-" may be used for any of the items in the promotion mode string.
This signifies either "don't care", in the matching fields, or "don't
modify", in the substitution fields. The two mode strings must
literally match the mode string from the display database, except for
case. You can use the "ScreenMode" preferences tool to browse these
display mode strings. The title string is taken from either the
screen's public screen name, if it has one, or the screen's title, if
it doesn't. A smaller substring may be used, since some screen titles
can get rather long. For example, the string "excellence!" matches the
64-odd character title used by Excellence 2.0 which begins with the
string "Excellence!". Case does not matter.
When searching mode promotion strings, the first match is used. For
this reason, it is better to put screen specific promotion tooltypes
before mode-wide promotion tooltypes.
PKludge can be stopped with the Commodity Exchange, or by double
clicking again on its workbench icon. If it detects an error when run
from workbench, it exits with no error message. (Remember the part
about this being a kludge? :-) ). If launched from the CLI, it uses
its command line parameters as tooltypes, and will set a return code as
listed below.
EXAMPLES
Here are some examples of mode promotion strings. Hopefully they will
be more clear than the above text was.
PROMOTE=-/NTSC:High Res Laced=SUPER72:Super-High Res Laced/100/-/-/-/-
This promotes any Amiga high res interlace screen (usually 640x400)
to SUPER72 super high res laced mode, in the same 640x400 resolution.
99% of applications should like this new mode just fine since it is
the same resolution. However, it won't cause the monitor to jump
if your workbench is also in SUPER72 mode because the new screen will
be opened with the same scan rate. Note than the 640x400 screen will
be smaller when viewed on the 800x600 or greater resolution of
SUPER72 super high res laced mode. For this reason, the "100" for
the left edge modes the screen right a bit to center it on the
monitor. You can adjust this value to suite your needs.
PROMOTE=-/NTSC:High Res=SUPER72:Super-High Res/100/-/-/-/-
This is the same as the above, but for non-interlace. In general,
you want to promote screens to the same aspect ratio as they were
before.
PROMOTE=excellence!/-=SUPER72:Super-High Res Laced/-/-/896/628/MAX
Promotes a screen who's title begins with "excellence!" to 896x628
resolution using MAX overscan. This is a good example of an
application (Excellence! 2.0) which can operate on larger screens
just fine, but only lacks the ability to open them. Be careful: Some
applications may not be this forgiving of new screen modes. In
general, applications which open windows on their screen which can be
resized will probably work OK. Applications which make intimate
assumptions about the size of their screen probably won't.
In general, there are some rules you can follow which will make life
easier. These are just rules of thumb; they're not hard and fast:
R1. You can usually promote a screen to a mode of a higher resolution
and keep the size the same. For example, you can promote all
640x400 screens to 800x600 SUPER72 mode, shift them right, keep
them in 640x400 size, and most applications should continue to work
fine. As long as they get the same *size* screen, they will
probably be happy.
R2. Applications which can deal with differently sized screens can
probably be promoted to higher resolution modes. For example, I
tried the freeware program "Gravity-Well" (which simulates
celestial mechanics) and it works fine when promoted to 896x628.
It just can't open a screen that big by itself, since it dates back
to AmigaDos 1.3.
R3. Don't "down-promote" screens to smaller sizes than the application
expects. For example, don't promote a 640x400 screen to a 320x200
mode.
R4. Try to promote modes to other modes of similar aspect ratios. For
example, it works OK to promote 640x400 (1.6) to 800x600 (1.3), but
it doesn't work well to promote it to 640x800 (0.8).
R5. Put screen-name specific promotion tooltypes _before_ general mode
promotion tooltypes. This will allow PKludge to see them first.
You can use both a screen title and an original mode together, in
which case both must match.
R6. Don't use odd values for sizes or positions. PKludge doesn't do
much sanity checking. You can certainly screw it up if you try.
RETURN VALUES
16 - The old mode string was not found in the display database.
17 - The new mode string was not found in the display database.
18 - An invalid PROMOTE tooltype format was found.
19 - Can't create a message port. Out of memory?
20 - Can't open an AmigaDos library. PKludge needs V39 libraries,
as used by AmigaDos 3.0 or later. It won't run under 2.04.
KNOWN BUGS
B1. PKludge SetFunction()'s the OpenScreenTagList() function. If another
program also setfunction's this *after* PKludge starts, and then
PKludge exits first, it will crash. Workaround: don't do this.
Quit the 2nd application first.
B2. PKludge doesn't do much sanity checking on the mode promotion
description strings. You can probably fool it easily and produce
unwanted results, perhaps even crashing your system.
B3. There is no GUI. Tooltypes are awkward for this sort of input. But
since the need for this program should go away eventually, I doubt
I'll fix this.
B4. There can only be 64 PROMOTE tooltypes. PKludge doesn't check for this
and you can trash memory if you give it more than that.
Workaround: don't do that. Limit yourself to 64.
B5. Although PKludge understands CLI arguments, it doesn't print a help
message and isn't very forgiving if you make mistakes. I suppose
I've mentioned already that this is free and worth just about what
you payed for it.
BUG REPORTS
Send bug reports to me at:
Steve Koren
405 Pulsar St.
Fort Collins, CO 80525 USA
303-226-4985 (USA)
I may or may not fix them. Can't hurt to try though.